1. Field of the Invention
The present invention relates to an apparatus for and a method of information processing for reading data from a storage medium in accordance with a read request.
2. Related Background Art
When a host computer reads data in succession from a magnetic disk in a magnetic disk drive, it is very likely that the data to be read successively is also stored at successive locations in the magnetic disk. In general, according to a communication protocol in SCSI, IDE, etc., used between a host computer and a magnetic disk drive, executing one read processing requires a command including such information as an address, actual data, and a status including information indicating whether the processing has been successful or unsuccessful be accessed in sequence. This unavoidably includes wasteful reading time spent for accessing a command and status which are irrelevant to the actual data transfer. Furthermore, when consecutive read commands are issued from the host computer, time is spent for accessing the status of a certain number of processing and a command of the following number of processing while the consecutive data is being transferred.
In such access processing, data is read from a memory as follows: desired data, which has been stored at a predetermined location in the magnetic disk is read by moving the reading head in the magnetic disk drive. At this time, the reading head continues to move even after reading the data. Hence, when the command for consecutive reading as mentioned above is executed, the reading head will have already moved to the center of the disk or out of the disk even if the data of the next read request immediately follows the data of the previous reading. Therefore, the reading head has to be moved to the location of the data required for the next read request in order to execute the following read request (this operation will be hereinafter referred to as a "seek"), or the system must wait until the required data comes under the reading head if the magnetic disk has already rotated and the required data has gone away from the reading head (this operation will be hereinafter referred to as "rotational delay"). In either case, the result is a time loss.
To prevent such time loss in successive reading, in the actual reading in the magnetic disk drive, instead of reading only the data required for the instant read request, a predetermined quantity of extra data adjacent to that data is read and the predetermined quantity of the extra data, which has been read, is stored in a storage medium such as a buffer memory. This means that, even if the data required for a certain read request is positioned at a location continuous to the data which has been used for the preceding read request, the required data will have been stored in a buffer memory or other storage medium when the processing based on the preceding read request is being carried out. This function, which enables a quick response to a request from the host computer by eliminating the need for the reading head to perform the wasteful seek or to incur the rotational delay, has been provided in a magnetic disk drive apparatus. Such a function is known as a pre-reading function.
For instance, a magnetic disk drive which employs a magnetic disk having concentric tracks has been designed to pre-read one track of data so as to avoid the time loss resulting from the reading head which moves from one track to another.
However, the magnetic disk drive apparatus equipped with the pre-reading function described above has been posing the following problems:
1. During pre-reading, if a read request is received which requires data other than the data to be pre-read, the magnetic disk drive apparatus immediately interrupts the pre-reading and executes seek in response to the new command. This has been problematic in that it causes a time loss resulting from the interruption of the pre-reading with a consequent delay in executing the new command. For this reason, a small quantity of data has conventionally been set for such pre-reading so as to quickly complete pre-reading and begin work on the next request. PA1 2. There has been another problem in that, if there is more data required for the following read request than the data to be secured by pre-reading, then the data which is obtained by pre-reading is insufficient for the read request and therefore, additional processing must be implemented to read the rest of the data which is not covered by the data which has been pre-read.
To be more specific, host computers generally access magnetic disk drives on the basis of a predetermined amount of data (hereinafter referred to as "cluster size") known as a logical size (an integral multiple of sector size) which is different from the physical sector size set in the magnetic disk of the magnetic disk drive. The host computers manage the data in the magnetic disks by cluster size. Hence, every access request issued from the host computers to the magnetic disk drives is based on an integral multiple of the cluster size. For this reason, if the pre-read quantity is set smaller than the cluster size, then even if the data secured by pre-reading is supposed to be used for a certain request, the data will not include all the data necessary for the request, necessitating regular reading after all.
Thus, pre-reading the data in a size smaller than the cluster size inevitably involves a processing time loss. Furthermore, because the magnetic disk drives are not capable of determining the cluster size of the host computers, they are not able to decide an effective size of data required for pre-reading. For this reason, the amount of data to be pre-read has traditionally been set larger than the cluster size in order to secure a sufficient quantity of data.
As described above, the solutions to the problems with pre-reading shown in 1 and 2 above have been conflicting with each other. To cope with the conflict, in conventional magnetic disk drives, an appropriate quantity of data to be pre-read has been set to ensure a balance. This has been no more than just an attempt to achieve an appropriate balance between the continuous reading of a given data size, wherein the data secured by pre-reading is continued to be used, and the random reading, wherein the data secured by pre-reading is not used. This has led to a problem in that the processing execution efficiency drops in some cases of reading.